#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

int main()
{
   int i, j;
   int x = 10, y = 15;
   char key;
   int ifFired = 0;

   while(1)
   {

   system("cls");

   if(ifFired == 0){
    for(i = 0; i < x; i++)
    printf("\n");
   }


   else{
      for(i = 0; i < x; i++)
    {

       for(j = 0; j < y; j++)
        printf(" ");
      printf("  |\n");
    }
    ifFired = 0;
   }
   for(j = 0; j < y; j++)
      printf(" ");
    printf("  *\n");
     for(j = 0; j < y; j++)
      printf(" ");
    printf("*****\n");
     for(j = 0; j < y; j++)
      printf(" ");
    printf(" * *");
    key=getch();

    if (key == 's')
        x++;
        if(key == 'w')
            x--;
            if(key == 'a')
                y--;
                if(key == 'd')
                    y++;
                    if(key == ' ')
                        ifFired = 1;

   }

    return 0;
}
